package kg.aibek.preuler1;

public class Problem9 {
	private boolean isSomething(int c) {
		int s = 1000 - c;
		for (int b = c + 1; b < s / 2; b++) {
			int a = s - b;
			if (b * b + c * c == a * a) {
				System.out.println(a + " - " + b + " - " + c);
				System.out.println(a * b * c);
				return true;
			}
		}

		return false;
	}

	public void solve() {
		for (int c = 1; c < 1000 / 2; c++) {
			if (isSomething(c)) {
				break;
			}
		}
		System.out.println("La finito");
	}

	public static void main(String[] args) {
		Problem9 p = new Problem9();
		p.solve();
	}
}
